<?php
namespace App\Http\Controllers\Home;

use App\Http\Controllers\Home\BaseController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class IndexController extends BaseController
{
	public function index(Request $request)
	{
	    $username = parent::getSession();
		$category = DB::table('category')->where("pid",0)->get();
		return view('Home/Index/index')->with(['category'=>$category,'username'=>$username]);
	}
	public function getMore()
    {
        $info = DB::table('goods')->get();
//        return view('Home/Index/ajaxGetmore')->with('info',$info);
        return response()->json(['info'=>$info]);
    }
}